Apple has defined a new QuickDraw picture comment type for embedded ICC profiles. The picture comment value of 224 is followed by a 4-byte selector that describes the type of data in the comment. Using a selector allows the flexibility to embed more ColorSync related information in the future. The following selectors are currently defined:
Selector Description
0 Begining of an ICC profile. Profile data to follow.
1 Continuation of ICC profile data. Profile data to follow.
2 End of ICC profile data. No profile data follows.
Because the dataSize parameter of the PicComment procedure is a signed 16-bit value, the maximum amount of profile data that can be embedded in a single picture comment is 32763 bytes (32767 - 4 bytes for the selector). You can embed a larger profile by using multiple picture comments of selector type 1. The profile data must be embedded in consecutive order, and the last piece of profile data must be followed by a picture comment of selector type 2.
All embedded ICC profiles, including those that fit within a single picture comment, must be followed by the end-of-profile picture comment (selector 2), as shown in the following examples.
In ColorSync 1.0, picture comment types CMBeginProfile (220) and CMEndProfile (221) are used to begin and end a picture comment. The CMBeginProfile comment is not supported for ICC profiles; however, the CMEndProfile comment can be used to end the current profile and begin using the System Profile for both ColorSync 1.0 and 2.0.
The CMEnableMatching (222) and CMDisableMatching (223) picture comments are used to begin and end color matching in both ColorSync 1.0 and 2.0
See Inside Macintosh: Imaging With QuickDraw for more information about picture comments.